Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client connection improvements #754

Merged
merged 2 commits into from
Nov 18, 2024
Merged

Conversation

h2zero
Copy link
Owner

@h2zero h2zero commented Nov 18, 2024

  • Removes the connection established flag as it should not be necessary.

  • Deleting the client instance from the onDisconnect callback is now supported.

  • NimBLEDevice::deleteClient no longer blocks tasks

  • Adds a new Config struct to NimBLEClient to efficiently set single bit config settings.

  • Adds NimBLEClient::setSelfDelete that takes the bool parameters deleteOnDisconnect and deleteOnConnectFail
    This will configure the client to delete itself when disconnected or the connection attempt fails.

  • Adds NimBLEClient::setConfig and NimBLEClient::getConfig which takes or returns a NimBLEClient::Config object respectively.

  • Reword BLE_HS_EAPP error string to be more accurate.

  • Replaces NimBLEDevice::setConnectionInProgress and NimBLEDevice::isConnectionInProgress() with lower level checks to avoid potential incorrect state reporting.

  • NimBLEClient::connect will instead call NimBLEScan::stop if it stopped the scan to release any resources waiting, the call the callback if set.

* Removes the connection established flag as it should not be necessary.
* Deleting the client instance from the `onDisconnect` callback is now supported.
* `NimBLEDevice::deleteClient` no longer blocks tasks
* Adds a new `Config` struct to `NimBLEClient` to efficiently set single bit config settings.
* Adds `NimBLEClient::setSelfDelete` that takes the bool parameters `deleteOnDisconnect` and `deleteOnConnectFail`
  This will configure the client to delete itself when disconnected or the connection attempt fails.
* Adds `NimBLEClient::setConfig` and `NimBLEClient::getConfig` which takes or returns a `NimBLEClient::Config` object respectively.

* Reword `BLE_HS_EAPP` error string to be more accurate.
Replaces `NimBLEDevice::setConnectionInProgress` and `NimBLEDevice::isConnectionInProgress()` with lower level checks to avoid potential incorrect state reporting.
`NimBLEClient::connect` will instead call `NimBLEScan::stop` if it stopped the scan to release any resources waiting, the call the callback if set.
@h2zero h2zero merged commit b719a39 into master Nov 18, 2024
31 checks passed
@h2zero h2zero deleted the client-connection-improvements branch November 18, 2024 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant